<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html>
<head>
    <base href="http://localhost:8686/estore/">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>toolman电子商务-登录页</title>
    <link rel="stylesheet" href="css/common.css"/>
    <link rel="stylesheet" href="css/style.css"/>

</head>
<body style="background-color: rgb(244,244,244)">
<div class="header1">
    <a href="index.jsp">
        <img src="images/log2.png">
    </a>
</div>
<div class="content1"> <!--背景颜色-->
    <div class="c1_box1"><!--背景图片-->
        <div class="login_box"><!--登录框-->
            <div class="center1">
                <form action="http://localhost:8686/estore/login" method="post">
                    <h1>账号登录</h1>
                    <h2><%= request.getAttribute("user") == null ? "公共场所请不要泄露您的密码，以防止账号丢失" : request.getAttribute("user")%>
                    </h2>


                    <div class="si_box">
                        <span class="usr_icon"></span>
                        <input id="username" type="text" name="username" placeholder="请输入用户名"/>
                    </div>
                    <!--分割条-->
                    <div class="c10"></div>
                    <div class="si_box">
                        <span class="pwd_icon"></span>
                        <input id="password" type="password" name="password" placeholder="请输入密码"/>
                    </div>
                    <div class="fg_box">
                        <a class="fg" href="#">忘记登录密码？</a>
                        <a class="treg" href="register.jsp">立即注册</a>
                    </div>
                    <div class="sub_box">
                        <input type="submit" value="登录" onclick="return check()"/>
                    </div>
                </form>
                <div>
                    请使用合作网站账号登录工具人商务网：
                </div>
                <div class="com_box">
                    <span class="tencent"></span>

                </div>
            </div>
        </div>
    </div>
</div>
<div class="footer1">
    <div class="links">
        <a href="#">关于我们</a>|
        <a href="#">联系我们</a>|
        <a href="#">友情链接</a>|
        <a href="#">关于我们</a>|
        <a href="#">联系我们</a>|
        <a href="#">友情链接</a>
    </div>
    <div>
        桂ICP备2020007031号 toolman.mdh.cool版权所有。
    </div>

    <img src="images/police.png">

</div>
</body>
<script>
    function check() {
        var name = document.getElementById("username").value;
        var password = document.getElementById("password").value;
        if (name == "") {
            alert("请输入用户名！！！");
            return false;
        }
        if (password == "") {
            alert("请输入密码！！！");
            return false;
        }

    }
</script>
</html>
